package com.newcoder.huawei;

public class ListNode {

    public int val;
    public ListNode next;

    //构造函数
    public ListNode() {
    }

    //构造函数
    public ListNode(int nodeV) {
        this.val = nodeV;
    }

    //构造函数
    public ListNode(int nodeV, ListNode nextNode) {
        this.val = nodeV;
        this.next = nextNode;
    }


    public int getVal() {
        return val;
    }

    public void setVal(int val) {
        this.val = val;
    }

    public ListNode getNext() {
        return next;
    }

    public void setNext(ListNode next) {
        this.next = next;
    }

}
